Imports System.Collections.ObjectModel
Imports OMANE.Common.Model.Interfaces
Imports Actuariat
Imports PTIC_GestionBDD


Public Class TableINCINV_FraFromDataTable
    Implements ITableMaintienINCINV_Fra

    Public Sub New(ByVal DtbleINCINV_Fra As DataTable, ByVal NomTable As String)
        m_Nom = NomTable
        m_DataTable = DtbleINCINV_Fra
    End Sub

    Private m_Nom As String
    Public ReadOnly Property Nom As String Implements Actuariat.ITableTravail.Nom
        Get
            Return m_Nom
        End Get
    End Property

    Private m_DataTable As DataTable
    Public ReadOnly Property DataTable As DataTable Implements ITableMaintienINCINV_Fra.DataTable
        Get
            Return m_DataTable
        End Get
    End Property

    Public ReadOnly Property TauxAbattement_Fra(ByVal NbMoisFranchise As Integer, ByVal AgeSous As Integer) As Double Implements Actuariat.ITableMaintienINCINV_Fra.TauxAbattement_Fra
        Get
            If AgeSous <= 64 Then
                Return m_DataTable.Rows(NbMoisFranchise)(AgeSous - 17)
            Else
                Return m_DataTable.Rows(NbMoisFranchise)(64)
            End If
            '_TbleINCINVFra.Rows(3)(If(ageSous <= 64, ageSous, 64) - 17)
        End Get
    End Property
End Class
